package com.dc.dbus.transport.rabbitmq;

import java.io.Serializable;

public class Msg implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	public final long msgId;
	
	public final int cmd;
	public final Object param;
	
	public final String source;
	
	public Msg(long msgId, int cmd, Object param, String source) {
		super();
		this.msgId = msgId;
		this.cmd = cmd;
		this.param = param;
		this.source = source;
	}

	@SuppressWarnings("unchecked")
	public <T> T getParam() {
		return (T) param;
	}
}
